home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
By Popular Request 2.0
/
By Popular Request 2.0 (Arsenal Computer).ISO
/
amiga_1
/
agraph.lha
/
AGraph.Doc
< prev
next >
Wrap
Text File
|
1995-06-13
|
15KB
|
387 lines
A-GRAPH V1.0
--------------
Written in compiled AMOS Basic by Dave Smith
----------------------------------------------
PURPOSE
-------
A-Graph was knocked up in the hope of a quick bit of cash... nah, on second
thoughts don't type that, Louise - I need to at least pretend to be sincere.
A-Graph is the result of countless hours of selfless toil, for the sole
purpose of bringing the world a cheap Amiga program to draw Bar, Line, Area
and Pie charts, for reports or presentations, in a user-friendly way. Many's
the time the author thoughtfully considered the question, "Shall I eat today,
or continue my countless hours of selfless toil?"
The answer was always the same.
And so today, those long weeks are over. The hard disk crash is just a
distant nightmare. The blown power supply and overheated CPU have been
forgotten. The stunted fingers from hours of typing have been mostly
repaired, in a Meccano sort of way, at the local casualty department. And
here, on a disk weighing substantially more than the programmer, is his
baby, the fruit of his labour, his hopefully nuclear-powered cash-magnet...
A-Graph.
LOADING
-------
From the workbench, double-click on the AGraph icon.
From the CLI or Shell, simply type "AGraph".
The program will take a few seconds to decompress, then the menu screen will
be displayed.
Please note that although A-Graph does run in 512K, you will probably need to
close all windows on the workbench and make sure it is the first thing you
run on boot-up. With 1 meg, such precautions are unnecessary.
A-Graph needs 2 other files to run, both found in the libs: drawer. These are
diskfont.library and mathtrans.library. If AGraph doesn't run first time,
check that these files exist. If not, simply copy them over from your
workbench disk to your A-Graph disk.
INTRODUCTION
------------
Right, I've done the interesting bit (the programming), now comes the bit
every software author loves to hate - the doc file!!! (Aaaargh)
Just kidding, text files are my life.
So what does A-Graph do? Well, this may surprise you but it draws graphs.
More specifically, it has the following features:
* Draws Bar, Line, Area and Pie charts from given data
* Many options including change size, colour and pattern of the graph
* Save graph as an IFF file (8-colour med-res)
* Load and Save data
* Works in both PAL and NTSC, with larger screen areas for both menu
and work screens with PAL (I hate programs which just give PAL users
the NTSC standard 200 lines)
* Workbench 2.0 Look and Feel! (Well, almost)
* Raises user-friendliness to an art form! (Ditto)
* Works with 512K and above
Whatever your graph needs, A-Graph will cater for them. As long as they
involve Bar, Line, Area and Pie charts.
MAIN MENU
---------
On loading the program, it will take a few seconds to decompress and then
you will be presented with the menu screen. This is where you set all of the
parameters for the graph (the data, graph type, grid on/off etc). The larger
"Draw Graph" button at lower left then allows you to view the graph. I'll
take you through the menu options one by one.
GRAPH TYPES
-----------
Choosing one of the graph types (Bar, Line, Area, Pie) will de-select the
previously selected one. If you have not specified a type, Bar will be
used as a default.
BAR - A vertical bar graph, drawn in the selected colour (see SET
COLORS) and pattern.
---
Options - Large/Medium/Small, Grid On/Off
LINE - A straightforward line, drawn in the selected colour. Crosses
marking each point of data can be turned on or off.
---
Options - Large/Medium/Small, Points On/Off, Grid On/Off
PIE - Data is sorted into ascending order and the pie chart is drawn
based on this sorted data. Points On/Off controls the labelling
of each slice of the pie.
One quick word about pie charts - they work best with up to 10
or at the most 15 pieces of data. For a good, accurate pie chart
I would recommend you keep your data down to that level.
---
Options - Large/Medium/Small, Points On/Off
AREA - Much like a line graph, except filled with your chosen pattern
and/or colour.
---
Options - Large/Medium/Small, Grid On/Off
Dataset 1 / 2
-------------
These buttons are toggle switches - click once on them to select, and
once again to de-select.
They are here for you to state which of the two data sets you want to be
drawn on your graph - set 1, set 2 or both.
If you have both sets selected, with Bar as the type, set 1 will be a bar
graph and set 2 will be drawn as a line on the same axes.
If Line is selected, set 1 will be a line and set 2 a bar graph.
If Area has been chosen, set 1 will be the area graph while set 2 will be
drawn as a line.
A Pie chart only draws one set of data at a time. If both sets are
selected for display, just set 1 will be shown.
Don't worry, you'll see what I mean when you try it! It's easier to see
than explain.
DATA OPTIONS
------------
Input Data
----------
Input Data lets you input the data on which the graph will be based (full
of surprises, this program). It asks for a "data point" - in other words,
a number. Then a label is required - just press return if you don't want
one. Otherwise, "1983", "December" or "1", for example, are all valid
labels.
One restriction on the data that I have imposed is that a value of 0 will
end the input process - that is, if you enter two data points of, say, 10
and 14, a value of 0 for the third will get you the response "OK, got 2
points of data - correct?". If it is not correct, you can alter the
original data or add new, extra points.
This restriction should not really cause many problems - if you do need a
0 in your graph, use 0.1 instead. That should work just as well.
Two Datasets?
-------------
Input Data, by the way, erases totally the existing data set you have
selected. Initially, you are editing set 1 - the button at the bottom
right of the Data section reflects this (it says "Dataset 1"). Clicking
on this button changes the set to be edited to set 2 (the button now says
"Dataset 2". Who said programmers were obtuse?). Both sets of data are
completely independant of one another - set 1 can be comprised of 3 bits
of data and set 2 24 bits (24, by the way, being the maximum number of
points). The data in set 1 can be 1, 2, 3 and in set 2 be 10001, 75 and
493 if you want (the graph will look a bit odd though).
Alter Data
----------
Alter Data also works on the current set. It allows you to go through the
existing data, changing it to your heart's content using the same method
as in Input Data - number then label.
Load and Save Data load and save the current data set respectively
(that's the problem with writing user-friendly programs. The doc file
always sounds ridiculous). The data is saved as a text file, with a <CR>
symbol at the end of each line. If anything but a data file is loaded,
the program will not crash but simply reject the false data. For
simplicity, I would stick to using the .DAT suffix if I were you!
Print Data
----------
Print Data prints out the current set to any preferences-compatible
printer. For this option to work, you need to boot from a standard
workbench disk with such files on it as devs:printer.device and
devs:system-configuration, otherwise the option will have no effect.
GRAPH OPTIONS
-------------
This is the fun bit. The options are Large/Medium/Small, Points On/Off,
Grid On/Off, Save as IFF and Annotate.
Size, and just how much it counts
---------------------------------
Clicking on the button marked "Large" will cycle through "Medium" and
"Small", in that order. This is the size of the graph. The maximum width
and height in Large mode is about 580*240 pixels in PAL, 580*190 in NTSC.
Small mode has a maximum graph size of about 200*100 in PAL, 200*90 in
NTSC. With the pie chart, Large gives a radius of 100 pixels, Medium a
radius of 75 pixels and Small a radius of 50 pixels.
A Small pie chart looks extremely cute.
Points On/Off
-------------
Points On, when clicked, becomes Points Off. Points, as described
earlier, are the little crosses on a line graph to help easy reading of
values. On a pie chart, they are the numbers on the slices. Points On
means they will be displayed, Points Off means they won't.
This option has no effect on Bar or Area graphs.
Grid On/Off
-----------
With all graphs except pie charts, when the button reads "Grid On" then a
grid will be drawn on the graph - this is most useful with Area and Line
graphs.
Save IFF
--------
Clicking on this will draw your graph, and then a file selector will
appear. The default name for the graph is "Graph.IFF", and since this is
not entirely original you can of course change it. Press Return or click
on OK to save the graph as an 8-colour medium res. IFF pic, suitable for
loading into DPaint, ProPage 2, Excellence! etc.
Annotate
--------
When you click on this, you will be asked to input some text for
inclusion on the graph. Type in your text and then position it on the
graph with the mouse.
The annotation will only be used for the type of graph it was added to -
for instance, if you annotate a bar graph, the text will not appear on a
line graph or a pie graph. You can have up to 24 annotations on one
graph, but if you change graph types and annotate the new type all of the
old annotations will be lost. They won't be lost if you just draw a new
graph, only if you annotate that new graph.
Pattern
-------
Click on the "+" button to step upwards through the 32 patterns, and the
"-" button to step downwards. Clicking on either with the right button
takes you straight back to pattern 0 - that is, solid colour with no
pattern. This is the default.
All graph types except the line graph are affected by the change.
COLOUR
------
Colour can be extensively altered, so deserves a section to itself. To
bring up the colour menu, click on the "Set Colors" button in the middle
of the screen (note to English lovers - I know it should be "Set
Colours", but the extra "u" wouldn't fit!).
Element Colo(u)rs
-----------------
You can set the individual colours of the axes, the grid and the two data
sets. Just click on the colour you want each to be drawn in. Note that
here you are not actually altering the colours - you are just selecting
which of them is to be used for what.
The axes' colour is also the colour of any annotations you may make.
Remember also that the first colour is the background colour, so anything
you draw in this will be invisible!
Colour Alteration
-----------------
Here you can alter the eight colours used for the graph to any in the
Amiga's 4096-colour palette.
Simply click on the colour you wish to alter, then drag the bars on the
RGB scales with the mouse (click on the bar with the left button and hold
it down, then move the mouse left or right before releasing the button).
Clicking to the right or left of the bar will also move it in the
corresponding direction. The colour values are displayed to the right of
the RGB scales, to help you get that exact shade.
Print Colours
-------------
Or Print Clrs, as we say in the business. This is a toggle switch -
clicking on it once changes all the colours to grey scales more suitable
if your graph is to be saved and printed. Clicking it again restores the
colours to the way they were before.
I suggest that you use a coloured or black background for a chart intended
to be used in a presentation or something, ie. if you are going to show
it on screen. If it is to be printed as part of a document or just from
DPaint then I'd select Print Clrs first, to get the white background if
nothing else. You may want to set all the colours to black except the
background, and use a pattern on the area/bar graphs. Either way prints
out equally well.
And to finish...
----------------
Click on OK to keep your changes, or Cancel to lose them. This only
applies to the palette changes - element colour information is always
kept.
MISC.
-----
Finally... About gives some info on the program, and Quit lets you leave
(if you must).
SHAREWARE!
----------
This program is Shareware! That means, if you like it and want to see it
updated (which it will be... see SUPPORT & UPDATES) you should send me ú5.
That's Five pounds sterling, if you're reading this on a non-UK terminal.
I think this is a fair amount for all the work I have put into A-Graph, and
all the work which is yet to go into it. Please be honest and send the fee
if you like the program, I'm a struggling CompSci student and need all the
financing I can get!
SUPPORT & UPDATES
-----------------
If you send me the Shareware fee, in return I'll send you the latest version
of A-Graph (this is V1.0) and the source code in both on-disk ASCII file and
printed form. I'll also add you onto a mailing list, so that whenever
A-Graph is updated you'll receive the updated version quite a while before
non-payers.
Future updates include:
* Many more graph types, including 3D with everything, MultiBar,
Stacked Bar, Circular Plot, 3-Axis Bar and Line graphs and, most
importantly, formula plotting.
* More than two data sets on one graph - probably six, I think.
* Improved data entry and editing.
* Statistical analysis, eg. coefficient correlation, trend forecasting.
* Printing from within the program (if I can get AMOS to do it!)
* Anything you suggest - I want your ideas when you register.
So you see, it will be well worth your while to send me the five quid! These
updates will only take place if enough people show interest, and are honest
enough to register.
I know you are!
CONTACT ADDRESSES
-----------------
Here's where to send the ú5, bug reports (shouldn't be any), ideas for the
future etc...
Dave Smith, Dave Smith,
4 Cleveland View, Fylde College,
South Bents, or Lancaster University,
Sunderland Lancaster
SR6 8AP LA1 4YF
Either will reach me, but if it's during term-time the Lancaster Uni address
will get to me quicker.
I can be contacted by email at:
csd016@uk.ac.lancs.cent1
or, from the Internet,
csd016@central1.lancaster.ac.uk
The first address should work from CIX and JANET, as well as one or two
smaller BBS that support JANET links. The second address is for use from
outside the UK, eg. Europe and the US, via the Internet.
THE END
-------
So it is! I hope you enjoy A-Graph, and find it useful... please contact me
for any reason you may find, and watch out for A-Graph V2.0!
---
Dave Smith
21/09/91